![]() |
EnableMenuItem |
||||
Header: | Menus.h | Carbon status: | Supported | |
Enables a menu item or a menu.
void EnableMenuItem ( MenuHandle theMenu, UInt16 item );
A handle to the menu containing the item to be enabled.
The item number of the menu item that you wish to enable. If you pass 0, EnableMenuItem enables the menu title and all items in the menu that were not previously individually disabled.
The EnableMenuItem function enables a menu item so that the user can choose the item from the menu. Unlike the pre–Mac OS 8.5 Menu Manager function EnableItem, the EnableMenuItem function can enable individual menu items with item numbers greater than 31. If the menu item has an associated icon, that icon is also enabled, unless the icon was previously individually disabled with the function DisableMenuItemIcon.
If your application enables a menu title using EnableMenuItem, it should then call either the DrawMenuBar function or the InvalMenuBar function to update the menu bar’s appearance.
See also the DisableMenuItem and IsMenuItemEnabled functions.
This function is available with Mac OS 8.5 and later.
Supported in Carbon. Available in CarbonLib 1.0 and later when MenusLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by MenusLib 8.5 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)